Change definition of UINT16_MAX macro (#84)
authorJakub Vít <jakub.vit@gmail.com>
Sun, 4 Sep 2016 18:44:39 +0000 (19:44 +0100)
committerSteven G. Johnson <stevenj@mit.edu>
Sun, 4 Sep 2016 18:44:38 +0000 (14:44 -0400)
Change UINT16_MAX from `~(utf8proc_uint16_t)0` to fixed value `65535U` to prevent weird behaviour in complex expressions.

utf8proc.h

index 82c0902405f03da92391117427f323fab58e643c..186641d2df8a72029017268d20c261b0aa2aa50c 100644 (file)
@@ -134,7 +134,7 @@ extern "C" {
 #endif
 
 #ifndef UINT16_MAX
-#  define UINT16_MAX ~(utf8proc_uint16_t)0
+#  define UINT16_MAX 65535U
 #endif
 
 /**